Case Study: The Development Life Cycle of a Flex Application
Sean Schnoor
Macromedia Strategic Services
Macromedia is all about enabling developers to build great experiences. Macromedia Flex puts an incredible technology in developers' hands. Flex gives them the ability to bring all of the richness of desktop application functionality to web applications. Building great experiences takes careful planning, a solid, well thought-out plan, and a talented team.
Those attending Macromedia MAX 2003 this year probably saw the Flex demo during the Day 1 of the General Session. During that session, Macromedia showed a very compelling dashboard application built jointly by Macromedia Strategic Services and WHITTMANHART, which uses the following dashboard application today to monitor their business.
Preview the WHITTMANHART dashboard application
(best viewed at 1024x768 or higher)
From this effort and subsequent projects, the Macromedia Strategic Services team has gathered significant knowledge about what constitutes a successful team and workflow for building Macromedia Flex applications—and wants to share it through this article.
Defining the Team
When the Macromedia and WHITTMANHART teams met, it was clear that there was quite a bit of talent in the room. However, it was also clear that many skills overlapped. As such, we had to ensure that we made the best use of the skills we had at our disposal.
We assembled the team into two core groups, a creative team and a technical team. As one might expect, the creative team was responsible for the overall look and feel of the application, the user interface design, and the user interface architecture. They guided the visible human interaction side of the experience. The technical team was responsible for implementing the user interface by developing components and the client and server-side business logic.
An ideal team for a Flex project is comprised of seven core roles; project manager, creative director, technical lead, visual designer, information architect, client programmer, server programmer. Understand the relationships better by viewing the following chart (Figure 2).
Figure 1. The team hierarchy for a Flex project.
On the WHITTMANHART project our team comprised of a total of 11 designers and developers:
- a project manager
- two designers
- one information architect
- three client programmers
- four server side developers
Except we only had eight people on the team to fill the 11 roles . Many times skills overlap between individuals, and the Flex project manager can leverage individuals in different places, using the methodology discussed in this article. In the end, a project dictates the team makeup; or the skills necessary for the project.
Next, let's look at the roles that make up the team. In this section, I use personas that describe each of the roles, typical activities of the role, and tools of the trade—rather than giving a straight definition for each role. My intent is to simplify the process for identifying the right person for a role on a team.
Visual Designer
The visual designer conceives, creates assets, and refines the look and feel for the application. This includes, but is not limited to the components of the application, user interface controls, iconography, and so forth. The visual designer is responsible for providing the conceptual design including typography, color, branding, and graphics.
While visual designers may relay concepts through documents, mood boards, and other artifacts, their primary contribution to the development process is graphic assets.
The toolset that designers use include products such as Macromedia Fireworks, Macromedia Flash, Macromedia Freehand, Adobe Illustrator and Adobe Photoshop
Information Architect
Information architects use user-centered design principles to organize content and navigability requirements for the application. They are responsible for defining the application’s structure, information design, user interface design, and interaction design. An information architect's goal is to define a well-structured, intuitive and functional interface that maps user requirements to a visible asset, typically referred to as a schematic, wire frame, or sometimes simple “wires.”
The information architect usually coordinates communication about requirements between business owners and creative/development teams. They are usually involved very early in the project life cycle and often participate in thinking and strategy sessions that surface to refine project requirements.
Information architecture is a relatively new discipline and is critical to well-designed Rich Internet Applications; information architects conceive and articulate animations for transitions, context, and usability. In a project without a formal information architect, look to the project manager or designers. It is not uncommon to find skill overlap in either of these disciplines.
The toolset that this person uses would include products such as Macromedia Fireworks and/or Microsoft Visio.
Flex Programmers
Flex programmers fall into one of two categories, client programmers and server programmers. Some teams are fortunate enough to find a developer with the skills required to do both, but it is unlikely. Since most teams will assign different people, let’s look at the roles separately.
Client Programmer
Client programmers are responsible for structuring and writing the code of the client application. This person works with the visual designer and information architect to implement the structure, design, and behaviors of the application. In the same way, the client programmer will interface with the server programmer to determine the APIs for the client-to-server data requests.
Key areas of focus for the client programmer are handling user input (from mouse and keyboard), component creation, user interface controls, and client-side validation. Since client programmers must interface with both the user aspects as well as the back-end aspects of the applications, they must have a breadth of knowledge that allows them to understand both the front and back end of the application.
There are two primary languages used in Flex, MXML and ActionScript. MXML is an XML-based declarative language that primarily defines the user interface, behaviors and effects in a Flex application. As such, a good client programmer for a Flex project will be very comfortable with HTML and will likely have experience with XML, ActiveX controls, web services, and VBScript. In addition, Flex uses of ActionScript 2.0 to define procedures and functions. Given that ActionScript 2.0 is object-oriented and based on ECMAScript, the ideal Flex client programmer will have an object-oriented programming background, experience with Java applets, and be extremely comfortable with JavaScript and ideally ActionScript.
Server Programmer
In contrast to the client programmer, who is responsible for the user aspects of the application, the server programmer is responsible for interfacing to the data sources and bringing that data to the application in a structured way.
The server programmer will use MXML and ActionScript to define the model and other services necessary to surface the data in the application. To be successful in Flex, the server programmer will need to possess much of the same coding knowledge that a client programmer knows (such as, ActionScript, XML, web services, JavaScript, and so forth). In addition to these skills, the server programmer should be comfortable with one or more of the typical server side technologies, such as JSP and servlets, ASP/.NET, ColdFusion, and so forth.
Server programmers will be busy during many phases of the application development. In the early stages of application development, after wire frames and requirements, server programmers create data models, define the server patterns, and determine the APIs for client method calls. Their role continues with creating server data storage, defining and implementing application security, and defining access to back end systems.
Project Manager
The project manager has many roles in a project, but one of the key roles is ensuring that there is communication between all of the parties involved in the project: developers, designers, customers, and so forth. The project manager oversees project resource allocation, timelines, and budgets. The project manager is the primary interface between the customer and the development team. It is the project manager’s responsibility to ensure that the team meets, or if possible, exceeds the customer’s requirements.
The project manager is involved throughout the duration of the project, but typically won’t be involved 100% of the time.
As mentioned in the information architect description, it is common to see the project manager act as the information architect on a project. Likewise the project manager may not only help define requirements, he or she may actually work with the customer to help guide and refine the requirements over time.
Typical tools that the project manager will use are Microsoft Project, Groove, and so forth.
Creative Lead/Technical Lead
As the names suggest, these folks are the team leads in their respective disciplines. These roles typically exist in larger teams. When a project requires four or five designers, three or four information architects, five client developers, and five system programmers, it needs an interface between these teams and the project manager. The creative/technical lead roles are critical in large teams; because they will help their teams prioritize and remain focused on project requirements. Likewise, they have real-world experience in their discipline and are central in helping the project manager set and maintain the application schedule.
On smaller teams, members of the team typically adopt these roles; these roles become a key resource for the project manager when handling the creative or technical direction of the project.
Application Life Cycle
It is critical to understand how these roles relate to the overall project flow and life cycle. Each of the team members participates in the different phases of the development effort. However, during certain phases, some roles aren’t leveraged, making them available for other tasks. For instance, on the WHITTMANHART project, one of our client developers possessed very strong design and information architecture skills, so we were able to leverage his skills on many phases of the project.
Take a look the life cycle of a typical Flex application, broken down into six distinct phases,
- Setup/Presale
- Analysis
- Design
- Development/Implementation
- Integration
- QA
Figure 2. The roles within the life cycle of a Flex application.
It is important to understand that each phase of the project life cycle depends on the previous phase. For instance, it wouldn't make sense to define the user interface without first understanding the problem, nor would a team start building components without understanding the architecture of the application. This well thought out process will make any Flex project pay off, as it did with the WHITTMANHART project.
Within each phase, our experience in developing Flex applications indicates that a high degree of interactivity between design and development is required. Throughout the design phase, we went through several iterations to validate design feasibility and performance characteristics. These are indicated by the blue arrows in the diagram above.
Setup/Scoping
All projects begin with solving a problem. Identifying the problem is usually not enough; typically a project manager determines the business issues surrounding the problem and identifies decision makers who own the problem. It is essential that the project manager understand the root cause of the problem and how it relates back to the business.
With WHITTMANHART, the problem was very clear. The executives spent too much time analyzing and processing their corporate data. They wanted to receive information versus raw data. For instance, they might receive an Excel spreadsheet with a variety of numbers about consulting rates spread out over the quarter. The goal was to understand if there were any obvious trends as they related to their quarterly rates. Determining this trend from raw numbers took time to calculate. Moreover, every time they wanted to access current numbers they would have to get a new spreadsheet from the IT department. Clearly, a dashboard that showed current trend information would be invaluable to their business processes.
Once the project manager has enough background on the problem, she will assess the approaches for solving the problem, which include a careful assessment of the technical environment.
With this information in hand, the project manager can develop an effective business case, which helps convey her understanding of the problem. Helping the customer visualize the solution to the problem with a conceptual prototype can be very powerful. Many times the project manager will find that showing the customer the solution in a tangible form really helps them visualize the solution.
Finally, the project manager will need to address the technical feasibility of the solution. Lastly, having an architectural overview of how the solution fits into the environment will be useful.
Analysis
The analysis phase, in many cases, is the key phase in determining the project’s success. During this phase, the development team along with the customer/business owner define the boundaries of the project and determine the project criteria.
Much of the time spent during this phase involves gathering information, both technical and business. There are many effective ways to gather the necessary business information. Some of the more common methods are to hold interviews with subject matter experts and examine the current methods for solving the problem. We were very fortunate on the WHITTMANHART project because the business owner of the project was very close to the problem that WHITTMANHART executives experienced, and had gathered much of the information before we arrived.
One of the goals during the analysis phase is to define the requirements for the application, prioritize, and then ultimately agree on the requirements with the customer. The requirements definition for the WHITTMANHART project was not atypical; we started out with more requirements than we could possibly deliver to meet the schedule. We assembled the entire team--from the business owners and Flex programmers, to the information architect, and designers--in one room and we went through a few versions of requirements to produce a well refined list.
It was important that all disciplines be present for this discussion because of the relationship between the technical possibilities and the business priorities. For instance, there might be a requirement to access certain data, however, the server developer who is very familiar with the data might inform the team that this data is not accessible. As a result, the team may have to prioritize that requirement in the second version of the project due to the version one deadlines. Given the tight timeline that we had, we needed to identify the trouble spots quickly; having the whole team present facilitated this process. Our goal was to define a prioritized list of manageable requirements that we could deliver on time. The importance of doing this can not be underestimated. It clearly lets everyone on the team know what they are building, but it also ensures that the team and the customer are on the same page with deliverables.
Once the team and customer/business owner define the requirements, they must develop use case scenarios that correlate with the requirements. This process is usually iterative, meaning that the team continues to refine the requirements and use cases as it discusses the problem with the customer/business owner.
Sometimes putting together rough wire frames helps the team understand the requirements and use case definitions. This work won’t go to waste either, because it helps in the next phase, design. In our project at WHITTMANHART, we drafted some very crude wire frames (Figure 3).
Figure 3. A rough wire frame for the WHITTMANHART project.
During this phase there are many technical aspects to consider. The Flex Programmers, representing both client and server skills, will want to evaluate any existing application components, APIs, and the overall layout of the network, back-end systems, table structures, and so forth. This process is a good overall assessment of the technical landscape to generate a high level description of the client/server interaction.
Design
In the design phase, each member of the team will be busy. On the WHITTMANHART project, our designers, developers, and information architects were in very good shape, largely due to thorough work in the analysis phase. The team had a clear idea of what they were building, the customer/business owner and the development team agreed on what was being built, and the team had already thought about the application interface.
During the design phase, the designers take much of what the team and customer/business owner learned during the analysis phase and create tangible assets. The requirements use cases, and preliminary wire frames help the information architect develop and finalize the wire frames. These wire frames also enable designers to apply design treatments and determine layout and look and feel for different phases of the application. This process is usually iterative among the information architect, the designer, the project manager and the customer, producing a final asset (Figure 4).
Figure 4. Assets created during the design phase.
In a parallel effort, the developers should have enough information to begin defining the application framework and some of the component specifications. The component specifications mature and finalize when the information architect completes the wire frames and the designer finalizes the design. Looking at the wire frame in Figure 3, it’s easy to see how a client developer begins to develop components. The product manager must ensure that there is a good line of communication between the development and creative teams during this process. Misunderstandings and miscommunication about the user interface can create costly delays.
At this point, server programmers define the façade that determines how the app will pass data from the application's back-end to the front-end. A façade is a unified interface to the back-end data and is the blueprint for data access. For instance, pulling data from SQLServer, Cognos, and some mainframe tables is much easier when a developer combines the access into a unified definition, or a façade.
As stated above, the design phase usually involves a few iterations between design and development. For example, programmers should consider creating rough components that stand-in for the functionality defined in the schematics to understand the development issues that might occur as a result of the design.
There are many factors that affect the actual time it takes to complete the design phase (client availability for feedback, application complexity, and so forth), but as a rule of thumb, design usually takes three times longer than analysis.
Development/Implementation
At this point, the team has a very clear picture what it is building. The team enters this phase knowing the application design, the component definitions, how the app will present data, and the application framework.
Now the team has to build it–building access to data, building the components, developing the server, and some of the client business logic.
The server developer implements the façade created in the design phase. The server developer must ensure that the application can access and present the data according to the façade description. If the server programmer deviates from using the planned façade, he should let the client programmer know immediately.
Next, the client programmer builds the application components. The client programmer will usually build business logic in the components; however reusing code should be paramount in coding decisions. Thus, the more generalized the components are, the better.
A client programmer must decide how to build the components, whether to use MXML and ActionScript (for building Flex components), or use Macromedia Flash MX 2004 to build a SWC file. There are many reasons why a client programmer might use one technique over the other. If the team has lots of Flash experience, using Flash MX 2004 is an easier way to build the components. However, there are times where it is easier to visually build a component, rather than building it all in code. For instance, on the WHITTMANHART project, creating a three-dimensional bar chart (Figure 5) was easier to build visually, through Flash, than through MXML and ActionScript.
Figure 5. Three-dimensional chart built in Flash MX 2004.
In this application, a user clicks the “Forecast,” or yellow row, setting the alpha of the “Actual” and “Plan” (the red/green and red) rows around 10%; after which, the chart shows the hidden data.
For WHITTMANHART, we also built highly reusable MXML components. The "At a glance” bar in Figure 6 is an example of a highly reuseable MXML component.
Figure 6. The "At a glance" bar is a highly reusable MXML component.
The "At a glance" bar (Figure 6) displays data trends. Our client developer built this component using Macromedia Flex, using MXML for the layout, behaviors, and interactions; and using ActionScript for some of the associated functions. Each graph in the bar is an instance of the same component, each pulling data from different data sources, for a total of five component instances.
Flex is very powerful in that it allows the team to leverage the skills that are available on the team. You can use both Flash MX 2004 (existing S WF files) and/or MXML and ActionScript to define the application components.
The designer is very busy during the early phases of the development and implementation phase. Throughout the entire life cycle of the application, the designer works on the component skins. The team develops the wire frames into a completed snapshot of the finished application, as we did with the WHITTMANHART application.
Figure 7. The completed WHITTMANHART application.
Flex provides developers and designers with a complete set of components, that they can use to build their own components. If a designer uses the standard component skin that comes with Flex, it will save the client developer development time. Using the standard skin will mean that the client developer can simply modify the components styles (such as font properties, dimensions, colors, and so forth), instead of having to reskin the components. Skinning can be a very intensive process, but sometimes it is a necessity. On the WHITTMANHART project, we implemented a tab control so that users could switch between the view in Figure 7 and a view to some Cognos reports. Since we wanted the tabs to have the same feel as the rest of the application, it meant that we had to completely change the skin on the standard tab component that came with Flex. While this involved some work, we were able to modify the standard Flex component, so we didn’t have to reinvent the wheel and build our own component from scratch. Flex provides teams with configurable components and assets that they can leverage and modify to fit the unique needs of any project.
As this development/implementation phase progresses, the server programmer locks down the data access methods, which enables the client programmer to begin binding the components to the data.
At the end of this phase, the team has created a working model for accessing data, the finalized skin for the application, and all of the components of the applications.
Integration
This phase can be one of the longest phases in the application development effort. At this point the team has built pieces of the application and may have working components, but still hasn’t assembled everything to ensure that it all works together. Application assembly is the goal of the integration phase.
Integration keeps the Flex programmer very busy. The client programmer must ensure that all of the components work together according to the requirements. The client or server programmer binds the application components to the back-end data, using the façade that the server developer provided. It will also be necessary to further develop the client-side business logic during this phase. Think of Flex as the "glue" in this phase—it helps the team perform all of the functions mentioned previously.
At this point, the team ensures that all components work together in the same shell and implements behaviors and effects that help define the application experience.
Once the Flex programmer completes the assembly process, the team should test the application and correct any problems that exist. After the team feels that everything works correctly, give the business owner time to test the application.
The application can be considered completed, once the customer agrees that you have provided an application that meets the predefined requirements.
In Closing
There are many benefits to using Macromedia Flex to deliver your applications:
- It lets all team members use tools that are familiar to them in the development process.
- It is a truly a parallel process; each team member performs his/her tasks with minimal dependencies on other roles.
- It uses a language that is very familiar to many developers and designers, and provides a environment where someone with traditional application development experience can excel.
Building a Flex application is similar to building an application in any structured environment. If that is something you are used to, the Flex development process will come natural to you.
If building applications in a structured environment is new to you, I believe you will find using Flex very effective. With Flex, team members work with the tools they know best, moreover, many of the phases allow different roles to work in parallel, which means developing applications quicker. Enjoy the experience.
Where to Go From Here
- Read more about why WHITTMANHART chose Flex and how they used it to build their application in the article, Rich Business Intelligence, by Dave Meeker and Ryan Carlos of WHITTMANHART.
- View the demo for the WHITTMANHART Flex application.
- Find articles about best practices, getting started, and visual design in the Macromedia Flex Developer Center
- Check out all aspects of RIAs in the Rich Internet Applications
- Usability Topic Center